﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:local="clr-namespace:Uhul.Controls"
  xmlns:System="clr-namespace:System;assembly=mscorlib"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  mc:Ignorable="d"
>
  
  <!--ToolTip template-->
  <ControlTemplate x:Key="CommonValidationToolTipTemplate" TargetType="ToolTip">
    <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
      <Grid.RenderTransform>
        <TranslateTransform x:Name="Translation" X="-25"/>
      </Grid.RenderTransform>
      <VisualStateManager.VisualStateGroups>
        <VisualStateGroup x:Name="OpenStates">
          <VisualStateGroup.Transitions>
            <VisualTransition GeneratedDuration="0"/>
            <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
              <Storyboard>
                <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="Translation">
                  <DoubleAnimation.EasingFunction>
                    <BackEase Amplitude=".3" EasingMode="EaseOut"/>
                  </DoubleAnimation.EasingFunction>
                </DoubleAnimation>
                <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
              </Storyboard>
            </VisualTransition>
          </VisualStateGroup.Transitions>
          <VisualState x:Name="Closed">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
            </Storyboard>
          </VisualState>
          <VisualState x:Name="Open">
            <Storyboard>
              <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="Translation"/>
              <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
            </Storyboard>
          </VisualState>
        </VisualStateGroup>
      </VisualStateManager.VisualStateGroups>
      <Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
      <Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
      <Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
      <Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
      <Border Background="#FFDC000C" CornerRadius="2">
        <TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
      </Border>
    </Grid>
  </ControlTemplate>





  <!--WatermarkAutoCompleteBox-->
  <Style TargetType="local:WatermarkAutoCompleteBox">
    <Setter Property="IsTabStop" Value="False"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="BorderBrush">
      <Setter.Value>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
          <GradientStop Color="#FFA3AEB9" Offset="0"/>
          <GradientStop Color="#FF8399A9" Offset="0.375"/>
          <GradientStop Color="#FF718597" Offset="0.375"/>
          <GradientStop Color="#FF617584" Offset="1"/>
        </LinearGradientBrush>
      </Setter.Value>
    </Setter>
    <Setter Property="Background" Value="#FFFFFFFF"/>
    <Setter Property="Foreground" Value="#FF000000"/>
    <Setter Property="MinWidth" Value="45"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:WatermarkAutoCompleteBox">
          <Grid Opacity="{TemplateBinding Opacity}">
        		<VisualStateManager.VisualStateGroups>
        			<VisualStateGroup x:Name="PopupStates">
        				<VisualStateGroup.Transitions>
        					<VisualTransition GeneratedDuration="0:0:0.1" To="PopupOpened"/>
        					<VisualTransition GeneratedDuration="0:0:0.2" To="PopupClosed"/>
        				</VisualStateGroup.Transitions>
        				<VisualState x:Name="PopupOpened">
        					<Storyboard>
        						<DoubleAnimation To="1.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PopupBorder"/>
        					</Storyboard>
        				</VisualState>
        				<VisualState x:Name="PopupClosed">
        					<Storyboard>
        						<DoubleAnimation To="0.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="PopupBorder"/>
        					</Storyboard>
        				</VisualState>
        			</VisualStateGroup>
        			<VisualStateGroup x:Name="ValidationStates">
        				<VisualState x:Name="Valid"/>
        				<VisualState x:Name="InvalidUnfocused">
        					<Storyboard>
        						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
        							<DiscreteObjectKeyFrame KeyTime="0">
        								<DiscreteObjectKeyFrame.Value>
        									<Visibility>Visible</Visibility>
        								</DiscreteObjectKeyFrame.Value>
        							</DiscreteObjectKeyFrame>
        						</ObjectAnimationUsingKeyFrames>
        					</Storyboard>
        				</VisualState>
        				<VisualState x:Name="InvalidFocused">
        					<Storyboard>
        						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
        							<DiscreteObjectKeyFrame KeyTime="0">
        								<DiscreteObjectKeyFrame.Value>
        									<Visibility>Visible</Visibility>
        								</DiscreteObjectKeyFrame.Value>
        							</DiscreteObjectKeyFrame>
        						</ObjectAnimationUsingKeyFrames>
        						<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
        							<DiscreteObjectKeyFrame KeyTime="0">
        								<DiscreteObjectKeyFrame.Value>
        									<System:Boolean>True</System:Boolean>
        								</DiscreteObjectKeyFrame.Value>
        							</DiscreteObjectKeyFrame>
        						</ObjectAnimationUsingKeyFrames>
        					</Storyboard>
        				</VisualState>
        			</VisualStateGroup>
        			<VisualStateGroup x:Name="WatermarkStates">
        				<VisualState x:Name="WatermarkOff">
        					<Storyboard>
        						<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Watermark" d:IsOptimized="True"/>
        					</Storyboard>
        				</VisualState>
        				<VisualState x:Name="WatermarkOn">
        					<Storyboard>
        						<DoubleAnimation Duration="0" To="0.4" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Watermark" d:IsOptimized="True"/>
        					</Storyboard>
        				</VisualState>
        			</VisualStateGroup>
        			<VisualStateGroup x:Name="FocusStates">
        				<VisualState x:Name="Focused"/>
        				<VisualState x:Name="Unfocused"/>
        			</VisualStateGroup>
        		</VisualStateManager.VisualStateGroups>
						<Grid Background="{TemplateBinding Background}" Margin="0">
	        		<TextBlock 
	        			x:Name="Watermark"
	        			Margin="0"
	        			Opacity=".4"
	        			Foreground="{TemplateBinding Foreground}"
	        			Padding="{TemplateBinding Padding}"
	        			Style="{TemplateBinding TextBoxStyle}"
                Text="{TemplateBinding WatermarkText}"
                VerticalAlignment="Stretch"
	            />
	        		<TextBox
	        			x:Name="Text" 
								Margin="0" 
	        			BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 
	        			Foreground="{TemplateBinding Foreground}"
	        			IsTabStop="True"
	        			Padding="{TemplateBinding Padding}" 
	        			Style="{TemplateBinding TextBoxStyle}"
                Background="{x:Null}"
	            />
						</Grid>
        		<Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
        			<ToolTipService.ToolTip>
        				<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource CommonValidationToolTipTemplate}">
        					<ToolTip.Triggers>
        						<EventTrigger RoutedEvent="Canvas.Loaded">
        							<BeginStoryboard>
        								<Storyboard>
        									<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
        										<DiscreteObjectKeyFrame KeyTime="0">
        											<DiscreteObjectKeyFrame.Value>
        												<System:Boolean>true</System:Boolean>
        											</DiscreteObjectKeyFrame.Value>
        										</DiscreteObjectKeyFrame>
        									</ObjectAnimationUsingKeyFrames>
        								</Storyboard>
        							</BeginStoryboard>
        						</EventTrigger>
        					</ToolTip.Triggers>
        				</ToolTip>
        			</ToolTipService.ToolTip>
        			<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
        				<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0"/>
        				<Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
        			</Grid>
        		</Border>
        		<Popup x:Name="Popup">
        			<Grid Opacity="{TemplateBinding Opacity}">
        				<Border x:Name="PopupBorder" BorderThickness="0" Background="#11000000" HorizontalAlignment="Stretch" Opacity="0">
        					<Border.RenderTransform>
        						<TranslateTransform X="1" Y="1"/>
        					</Border.RenderTransform>
        					<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0" HorizontalAlignment="Stretch" Opacity="1.0" Padding="0">
        						<Border.Background>
        							<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        								<GradientStop Color="#FFDDDDDD" Offset="0"/>
        								<GradientStop Color="#AADDDDDD" Offset="1"/>
        							</LinearGradientBrush>
        						</Border.Background>
        						<Border.RenderTransform>
        							<TransformGroup>
        								<TranslateTransform X="-1" Y="-1"/>
        							</TransformGroup>
        						</Border.RenderTransform>
        						<ListBox x:Name="Selector" BorderThickness="0" Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemTemplate="{TemplateBinding ItemTemplate}" ItemContainerStyle="{TemplateBinding ItemContainerStyle}" ScrollViewer.VerticalScrollBarVisibility="Auto"/>
        					</Border>
        				</Border>
        			</Grid>
        		</Popup>
        	</Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>





  <!--WatermarkTextBox-->
  <Style TargetType="local:WatermarkTextBox">
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Background" Value="#FFFFFFFF"/>
    <Setter Property="Foreground" Value="#FF000000"/>
    <Setter Property="Padding" Value="2"/>
    <Setter Property="BorderBrush">
      <Setter.Value>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
          <GradientStop Color="#FFA3AEB9" Offset="0"/>
          <GradientStop Color="#FF8399A9" Offset="0.375"/>
          <GradientStop Color="#FF718597" Offset="0.375"/>
          <GradientStop Color="#FF617584" Offset="1"/>
        </LinearGradientBrush>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="local:WatermarkTextBox">
          <Grid x:Name="RootElement">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal"/>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ColorAnimation Duration="0" To="#FF99C1E2" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)" Storyboard.TargetName="MouseOverBorder"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="ReadOnly">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ReadOnlyVisualElement"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualElement"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="ValidationStates">
                <VisualState x:Name="Valid"/>
                <VisualState x:Name="InvalidUnfocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="InvalidFocused">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <Visibility>Visible</Visibility>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
                      <DiscreteObjectKeyFrame KeyTime="0">
                        <DiscreteObjectKeyFrame.Value>
                          <System:Boolean>True</System:Boolean>
                        </DiscreteObjectKeyFrame.Value>
                      </DiscreteObjectKeyFrame>
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>

              <VisualStateGroup x:Name="WatermarkStates">
                <VisualState x:Name="WatermarkOff">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Watermark" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="WatermarkOn">
                  <Storyboard>
                    <DoubleAnimation Duration="0" To="0.4" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Watermark" d:IsOptimized="True"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              
            </VisualStateManager.VisualStateGroups>
            
            <Border
              x:Name="Border"
              BorderBrush="{TemplateBinding BorderBrush}"
              BorderThickness="{TemplateBinding BorderThickness}"
              Background="{TemplateBinding Background}"
              CornerRadius="1"
              Opacity="1"
            >
              <Grid>
                <Border x:Name="ReadOnlyVisualElement" Background="#5EC9C9C9" Opacity="0"/>
                <TextBlock 
	        			  x:Name="Watermark"
	        			  Margin="0"
	        			  Opacity=".4"
	        			  Foreground="{TemplateBinding Foreground}"
	        			  Padding="{TemplateBinding Padding}"
	        			  
                  Text="{TemplateBinding WatermarkText}"
                  VerticalAlignment="Stretch"
	              />
								<!--Style="{TemplateBinding TextBoxStyle}"-->
                <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
                  <ScrollViewer
                    x:Name="ContentElement"
                    BorderThickness="0"
                    IsTabStop="False"
                    Padding="{TemplateBinding Padding}"/>
                </Border>
              </Grid>
            </Border>
            <Border x:Name="DisabledVisualElement" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}" Background="#A5F7F7F7" IsHitTestVisible="False" Opacity="0"/>
            <Border x:Name="FocusVisualElement" BorderBrush="#FF6DBDD1" BorderThickness="{TemplateBinding BorderThickness}" IsHitTestVisible="False" Margin="1" Opacity="0"/>
            <Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
              <ToolTipService.ToolTip>
                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource CommonValidationToolTipTemplate}">
                  <ToolTip.Triggers>
                    <EventTrigger RoutedEvent="Canvas.Loaded">
                      <BeginStoryboard>
                        <Storyboard>
                          <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
                            <DiscreteObjectKeyFrame KeyTime="0">
                              <DiscreteObjectKeyFrame.Value>
                                <System:Boolean>true</System:Boolean>
                              </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                          </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                      </BeginStoryboard>
                    </EventTrigger>
                  </ToolTip.Triggers>
                </ToolTip>
              </ToolTipService.ToolTip>
              <Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0"/>
                <Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
              </Grid>
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
	
	
	
	
	
	
	<!--
	MapPinButton
	spendlik v mape jako tlacitko
	pokud obsahuje jeho styl prvek nazvany GradientPinShape 
	vykresli se zadaba barva jako gradient, jinak plna barva
	-->
	<Style TargetType="local:MapPinButton">
			<Setter Property="Foreground" Value="#FFffffff"/>
			<Setter Property="Background" Value="#FF808080"/>
			<Setter Property="BorderBrush" Value="#FF404040"/>
			<Setter Property="FontSize" Value="300"/>
			<Setter Property="Content">
				<Setter.Value>
					<Ellipse Fill="White" Margin="0" Opacity="0.725" />
				</Setter.Value>
			</Setter>
			
			<Setter Property="Template">
				<Setter.Value>
        <ControlTemplate TargetType="local:MapPinButton">
          <Viewbox>
          	<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
                  
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ActionBackground"/>
										</Storyboard>
									</VisualState>
                  
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FF404040" Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" Storyboard.TargetName="ActionBackground"/>
											<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ActionBackground"/>
										</Storyboard>
									</VisualState>
                  
									<VisualState x:Name="Disabled">
										<Storyboard>
											<DoubleAnimation Duration="0" To=".55" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="DisabledVisualElement"/>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
                
								<VisualStateGroup x:Name="FocusStates">
                  
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity"
                                       Storyboard.TargetName="FocusVisualElement"/>
										</Storyboard>
									</VisualState>
                  
									<VisualState x:Name="Unfocused"/>
                  
								</VisualStateGroup>
                
							</VisualStateManager.VisualStateGroups>
						<Grid>
              
							

							<Path
                x:Name="BackgroundPinShape"
                Data="M150,0.5 C232.56657,0.5 299.5,66.985718 299.5,149 C299.5,193.85156 279.48206,234.05896 247.83664,261.28787 L247.06996,261.93179 L200,321 L150,401 L100,322 L52.752724,261.78287 L52.163376,261.28787 C20.517935,234.05896 0.50000215,193.85156 0.5,149 C0.50000215,66.985718 67.433434,0.5 150,0.5 z"
                StrokeThickness="23"
			          Margin="0,0,0,-1.5" Stretch="Fill" UseLayoutRounding="False"
                Fill="{TemplateBinding Background}" IsHitTestVisible="False"
								Opacity="1"
              />

              <Path
                x:Name="GradientPinShape"
                Data="M150,0.5 C232.56657,0.5 299.5,66.985718 299.5,149 C299.5,193.85156 279.48206,234.05896 247.83664,261.28787 L247.06996,261.93179 L200,321 L150,401 L100,322 L52.752724,261.78287 L52.163376,261.28787 C20.517935,234.05896 0.50000215,193.85156 0.5,149 C0.50000215,66.985718 67.433434,0.5 150,0.5 z"
                StrokeThickness="23"
			          Margin="0,0,0,-1.5" Stretch="Fill" UseLayoutRounding="False"
                IsHitTestVisible="False"
								Opacity="0"
              >
              	<Path.Fill>
								  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									  <GradientStop Color="#FFe0e0e0" Offset="0"/>
									  <GradientStop Color="#FF404040" Offset="1"/>
								  </LinearGradientBrush>
							  </Path.Fill>
              </Path>

              <Path
								x:Name="BorderPinShape"
                Data="M150,0.5 C232.56657,0.5 299.5,66.985718 299.5,149 C299.5,193.85156 279.48206,234.05896 247.83664,261.28787 L247.06996,261.93179 L200,321 L150,401 L100,322 L52.752724,261.78287 L52.163376,261.28787 C20.517935,234.05896 0.50000215,193.85156 0.5,149 C0.50000215,66.985718 67.433434,0.5 150,0.5 z"
			          Stroke="{TemplateBinding BorderBrush}" StrokeThickness="23"
								Margin="0,0,0,-1.5" Stretch="Fill" UseLayoutRounding="False"
                IsHitTestVisible="False" Opacity="1"
              />
							
							
							<Path
								x:Name="ActionBackground"
                Data="M150,0.5 C232.56657,0.5 299.5,66.985718 299.5,149 C299.5,193.85156 279.48206,234.05896 247.83664,261.28787 L247.06996,261.93179 L200,321 L150,401 L100,322 L52.752724,261.78287 L52.163376,261.28787 C20.517935,234.05896 0.50000215,193.85156 0.5,149 C0.50000215,66.985718 67.433434,0.5 150,0.5 z"
			          Stroke="#ff404040" StrokeThickness="23"
								Margin="0,0,0,-1.5" Stretch="Fill" UseLayoutRounding="False"
                Fill="#FFffffff" IsHitTestVisible="False" Opacity=".2"
              />


              <!--<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="3">
								<Grid Background="{TemplateBinding Background}" Margin="1">
                  
									<Border x:Name="BackgroundAnimation" Background="#FF448DCA" Opacity="0"/>
									
                  <Rectangle x:Name="BackgroundGradient">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
												<GradientStop Color="#FFFFFFFF" Offset="0"/>
												<GradientStop Color="#F9FFFFFF" Offset="0.375"/>
												<GradientStop Color="#E5FFFFFF" Offset="0.625"/>
												<GradientStop Color="#C6FFFFFF" Offset="1"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
								</Grid>
							</Border>-->
              
							<ContentPresenter
                x:Name="contentPresenter"
                ContentTemplate="{TemplateBinding ContentTemplate}"
                Content="{TemplateBinding Content}"
                Margin="75,0" d:LayoutOverrides="Width" Height="297" VerticalAlignment="Top" HorizontalAlignment="Center"
              />

              <Path
                x:Name="DisabledVisualElement"
                Data="M150,0.5 C232.56657,0.5 299.5,66.985718 299.5,149 C299.5,193.85156 279.48206,234.05896 247.83664,261.28787 L247.06996,261.93179 L200,321 L150,401 L100,322 L52.752724,261.78287 L52.163376,261.28787 C20.517935,234.05896 0.50000215,193.85156 0.5,149 C0.50000215,66.985718 67.433434,0.5 150,0.5 z"
			          Margin="0,0,0,-1.5" Stretch="Fill" Stroke="#FFFFFFFF" UseLayoutRounding="False" StrokeThickness="23"
                Fill="#FFFFFFFF" IsHitTestVisible="False" Opacity="0"
              >
              </Path>
              
              <Path
                x:Name="FocusVisualElement"
                Data="M150,0.5 C232.56657,0.5 299.5,66.985718 299.5,149 C299.5,193.85156 279.48206,234.05896 247.83664,261.28787 L247.06996,261.93179 L200,321 L150,401 L100,322 L52.752724,261.78287 L52.163376,261.28787 C20.517935,234.05896 0.50000215,193.85156 0.5,149 C0.50000215,66.985718 67.433434,0.5 150,0.5 z"
			          Margin="0,0,0,-1.5" Stretch="Fill" Stroke="#FF6DBDD1" UseLayoutRounding="False" StrokeThickness="10"
                IsHitTestVisible="False" Opacity="0"
              >
              </Path>

						</Grid>
          </Viewbox>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
  
</ResourceDictionary>
